m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
-m4_define([glib_required_version], [2.31.11])
+m4_define([glib_required_version], [2.31.13])
m4_define([pango_required_version], [1.29.0])
m4_define([atk_required_version], [2.1.5])
m4_define([cairo_required_version], [1.10.0])
if (values->values)
{
- g_value_array_free (values->values);
+ g_array_free (values->values, TRUE);
values->values = NULL;
}
if (values->sections)
parent = gtk_style_context_get_parent (context);
if (values->values == NULL)
- values->values = g_value_array_new (id + 1);
- while (values->values->n_values <= id)
- g_value_array_append (values->values, NULL);
+ {
+ values->values = g_array_new (FALSE, TRUE, sizeof (GValue));
+ g_array_set_clear_func (values->values, (GDestroyNotify) g_value_unset);
+ }
+ if (id <= values->values->len)
+ g_array_set_size (values->values, id + 1);
/* http://www.w3.org/TR/css3-cascade/#cascade
* Then, for every element, the value for each property can be found
if (specified)
{
_gtk_css_style_property_compute_value (prop,
- g_value_array_get_nth (values->values, id),
+ &g_array_index (values->values, GValue, id),
context,
specified);
}
else
{
const GValue *parent_value;
- GValue *value = g_value_array_get_nth (values->values, id);
+ GValue *value = &g_array_index (values->values, GValue, id);
/* Set NULL here and do the inheritance upon lookup? */
parent_value = _gtk_style_context_peek_property (parent,
_gtk_style_property_get_name (GTK_STYLE_PROPERTY (prop)));
g_return_val_if_fail (GTK_IS_CSS_COMPUTED_VALUES (values), NULL);
if (values->values == NULL ||
- id >= values->values->n_values)
+ id >= values->values->len)
return NULL;
- v = g_value_array_get_nth (values->values, id);
+ v = &g_array_index (values->values, GValue, id);
if (!G_IS_VALUE (v))
return NULL;